<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Title</title>
    
    <style>
      .card {
        border: 1px gray solid;
        border-radius: 10px;
        padding: 15px;
      }
      
      .card-title {
        font-size: 15px;
        font-weight: bold;
        margin: 10px;
      }
      
      .card-body > div {
        color: darkgray;
        background: pink;
        margin: 10px;
        width: 100px;
        height: 100px;
      }
    </style>
  </head>
  <body>
    <!--align-items属性设置flex项在交叉轴的对齐方式，其属性值可为使flex项沿交叉轴拉伸以填充父容器的stretch、使flex项沿交叉轴居中且不拉伸的center、使flex项沿交叉轴开始位置且不拉伸的flex-start或使flex项沿交叉轴结束位置且不拉伸的flex-end-->
    <div class="card">
      <div class="card-title">使flex项沿交叉轴拉伸以填充父容器的stretch</div>
      <div class="card-body" style="display: flex;align-items: stretch">
        <span style="background: pink;color: darkgray;margin: 10px">1</span>
        <div>2</div>
        <div>3</div>
      </div>
    </div>
    <br>
    <div class="card">
      <div class="card-title">使flex项沿交叉轴居中且不拉伸的center</div>
      <div class="card-body" style="display: flex;align-items: center">
        <span style="background: pink;color: darkgray;margin: 10px">1</span>
        <div>2</div>
        <div>3</div>
      </div>
    </div>
    <br>
    <div class="card">
      <div class="card-title">使flex项沿交叉轴开始位置且不拉伸的flex-start</div>
      <div class="card-body" style="display: flex;align-items: flex-start">
        <span style="background: pink;color: darkgray;margin: 10px">1</span>
        <div>2</div>
        <div>3</div>
      </div>
    </div>
    <br>
    <div class="card">
      <div class="div-card-title">使flex项沿交叉轴结束位置且不拉伸的flex-end</div>
      <div class="card-body" style="display: flex;flex-flow:column;align-items: flex-end">
        <span style="background: pink;color: darkgray;margin: 10px">1</span>
        <div>2</div>
        <div>3</div>
      </div>
    </div>
  </body>
</html>